home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 4.iso / dist / cluster_admin.idb / usr / cluster / bin / cdb-exitop.z / cdb-exitop
Text File  |  2002-10-15  |  4KB  |  95 lines

  1. #!/sbin/sh
  2. #                                                                         
  3. #  Copyright (C) 1998, Silicon Graphics, Inc.                             
  4. #  All Rights Reserved.                                                   
  5. #                                                                         
  6. #  UNPUBLISHED -- Rights reserved under the copyright laws of the United  
  7. #  States.  Use of a copyright notice is precautionary only and does not  
  8. #  imply publication or disclosure.                                       
  9. #                                                                         
  10. #  THIS SOFTWARE CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION OF     
  11. #  SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION, DISTRIBUTION, OR 
  12. #  DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN    
  13. #  PERMISSION OF SILICON GRAPHICS, INC.                                   
  14. #                                                                         
  15. #  U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND                               
  16. #  Use, duplication or disclosure by the Government is subject to         
  17. #  restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph       
  18. #  (c)(1)(ii) of the Rights in Technical Data and Computer Software       
  19. #  clause at DFARS 252.227-7013 and/or in similar or successor clauses    
  20. #  in the FAR, or the DOD or NASA FAR Supplement.  Unpublished-- rights   
  21. #  reserved under the copyright laws of the United States.                
  22. #  Contractor/manufacturer is Silicon Graphics, Inc.,                     
  23. #  2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.                 
  24. #
  25. #
  26. # Exitop for Cluster Administration Services: this script should be executed
  27. # by inst/swmgr after installing CAS. It sets up the initial CDB if necessary.
  28. # This exitop is part of cluster_admin product
  29. #
  30. # "$Id: cdb-exitop,v 1.10 1999/11/10 01:52:32 fbdp Exp $"
  31.  
  32. BINDIR=${rbase:-}/usr/cluster/bin
  33.  
  34. CDB_DB_DIR=$rbase/var/cluster/cdb
  35. CDB_DB=$CDB_DB_DIR/cdb.db
  36. export CDB_DB
  37.  
  38. #
  39. # If the CDB does not exist, create default CDB header and basic nodes.
  40. #
  41. if [ ! -f $CDB_DB ]; then
  42.     mkdir -p $CDB_DB_DIR
  43.     $BINDIR/cdbnew $CDB_DB
  44. fi
  45.  
  46. #
  47. # Stop cmond process. Do not check for errors. cmond process might have
  48. # exited when new binaries are installed.
  49. #
  50. ${rbase}/etc/killall -9 cmond > /dev/null 2>&1
  51.  
  52. ${rbase}/sbin/chkconfig cluster on;
  53.  
  54. #
  55. # Start cmond process
  56. #
  57. #
  58. # CAD uses lots of file descriptors. Not all file
  59. # descriptors are open at the same time.
  60. #
  61. limit descriptors 2500
  62. if [ -f /etc/config/cmond.options ]; then
  63.     $BINDIR/cmond `cat /etc/config/cmond.options` 
  64. else
  65.     $BINDIR/cmond
  66. fi
  67.  
  68. if [ $? -ne 0 ]; then
  69.     echo "cmond process could not be started"
  70.     echo "Please run /etc/init.d/cluster start after installation"
  71. fi
  72.  
  73. if grep -q -e '^sgi-cad[     ]' /etc/services; then
  74.     # 'sgi-cad' entry is already defined.
  75.     :
  76. else
  77.     echo 
  78.     echo "\t" "* * * * * * * * * * I M P O R T A N T * * * * * * * * * * * * *"
  79.     echo
  80.     echo "\t" "\"sgi-cad\" service MUST be added to /etc/services.  Restart cluster"
  81.     echo "\t" "processes after adding the entry.  Failure to do so will cause"
  82.     echo "\t" "cluster and CXFS/FailSafe services to function incorrectly.  "
  83.     echo "\t" "Please refer to the CXFS or FailSafe Administrator's Guide "
  84.     echo "\t" "for more information."
  85.     echo
  86. fi;
  87.  
  88. #
  89. # Cluster admin group processes need not be explicitly started. They are 
  90. # started when cmond is started (AUTOACTION variable for cluster_admin
  91. # process group is "start").
  92. #
  93.  
  94. exit 0;
  95.